package lab02.test19;

/**
 * Created by Administrator on 2017/10/30.
 */
public class Convert {
        public static void main(String[] args) {
                String result="HelloWorld";
                   char tmp;
                    for(int i=9;i>=0;i--){
                            tmp=result.charAt(i);
                            if(tmp>='A'&&tmp<='Z'){
                                    System.out.print((char)(tmp+32));
                            }else {
                                    System.out.print((char)(tmp-32));
                            }
                    }

            }
    }






// String str="HelloWorld";
//         char[] ch=str.toCharArray();//字符串转成char数组
//         StringBuffer buffer=new StringBuffer();
//         for (int i=str.length()-1;i>=0;i--){
//         if (ch[i]>='A'&&ch[i]<='Z') {
//         buffer.append(String.valueOf(ch[i]).toLowerCase());
//         }else if (ch[i]>='a'&&ch[i]<='z'){
//         buffer.append(String.valueOf(ch[i]).toUpperCase());
//
//         }
//         }
//         System.out.println(buffer.toString()); }}